package com.example.guide.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource("car.properties")
public class Car {

    @Value("${mycar.code}")
    private int code;

    @Value("${mycar.name}")
    private String name;

    @Override
    public String toString() {
        return "Car{" +
                "code=" + code +
                ", name='" + name + '\'' +
                '}';
    }
}
